package cn.signalpha.modules.shop.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 数据传输对象实体类
 *
 * @author signalpha
 */
@Data
@ApiModel(value = "OrderRefundDTO对象", description = "订单退换货")
public class OrderRefundDTO implements Serializable {

    private static final long serialVersionUID = 1L;

	@Data
	public static class IdDTO implements Serializable {
		private static final long serialVersionUID = 1L;
		@NotNull
		@ApiModelProperty(value = "id")
		private Long id;
	}

	@Data
	public static class ApplyDTO implements Serializable {
		private static final long serialVersionUID = 1L;
		@NotNull
		@ApiModelProperty(value = "订单id")
		private Long orderId;
		@NotNull
		@ApiModelProperty(value = "订单详情id")
		private Long orderDetailId;
		@ApiModelProperty(value = "文件凭证")
		private String buyerImg;
		@ApiModelProperty(value = "申请原因")
		private String buyerMsg;
		@Min(1)
		@NotNull
		@ApiModelProperty(value = "退货数量")
		private Integer goodsNum;
		@NotNull
		@ApiModelProperty(value = "商品状态：0未收到货 1已收到货")
		private Integer goodsStatus;
		@NotNull
		@ApiModelProperty(value = "售后类型：1退款 2退款退货")
		private Integer refundType;
	}

	@Data
	public static class RejectDTO implements Serializable {
		private static final long serialVersionUID = 1L;
		@NotNull
		@ApiModelProperty(value = "id")
		private Long id;
		@ApiModelProperty(value = "拒绝原因")
		private String sellerMsg;
	}

	@Data
	public static class ApplyAgreeDTO implements Serializable {
		private static final long serialVersionUID = 1L;
		@NotNull
		@ApiModelProperty(value = "id")
		private Long id;
		@NotNull
		@ApiModelProperty(value = "商户地址id")
		private Long sellerAddressId;
	}

	@Data
	public static class LogisticsDTO implements Serializable {
		private static final long serialVersionUID = 1L;
		@NotNull
		@ApiModelProperty(value = "id")
		private Long id;
		@NotNull
		@ApiModelProperty(value = "物流类型：1快递物流 2到店退货")
		private Integer logisticsType;
		@ApiModelProperty(value = "快递单号")
		private String logisticsNo;
		@ApiModelProperty(value = "快递名")
		private String logisticsName;
	}
}
